﻿@model enqueteJwVd.ViewModels.SurveyIndexViewModel

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Surveys</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
<!--        <th>
            Id
        </th> -->
        <th>
            Title
        </th>
        <th>
            Description
        </th>
<!--        <th>
            State
        </th>
        <th>
            ActivationDate
        </th>
        <th>
            EndDate
        </th>
        <th>
            Anonymous
        </th>
        <th>
            EndText
        </th> -->
        <th></th>
    </tr>

@foreach (var item in Model.Surveys) {
    <tr>
<!--        <td>
            @Html.DisplayFor(modelItem => item.Id)
        </td> -->
        <td>
            @Html.DisplayFor(modelItem => item. Title)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Description)
        </td>
<!--        <td>
            @Html.DisplayFor(modelItem => item.State)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ActivationDate)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.EndDate)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Anonymous)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.EndText)
        </td> -->
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
            @Html.ActionLink("Details", "Details", new { id=item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.Id })|
            @Html.ActionLink("Activate", "ActivateSurvey", new {id=item.Id})
        </td>
    </tr>
}

</table>
